#pragma once


#include "RBTree.h"


namespace chen
{
	template<class K>
	class set
	{
		struct SetOfT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};

	public:
		typedef typename RBTree<K, K, SetOfT>::const_iterator iterator;
		typedef typename RBTree<K, K, SetOfT>::const_iterator const_iterator;

		bool insert(const K& key)
		{
			return _t.Insert(key);
		}

		void inorder()
		{
			_t.inOrder();
		}

		iterator begin()
		{
			return _t.begin();
		}

		iterator end()
		{
			return _t.end();
		}

	private:
		RBTree<K, K, SetOfT> _t;
	};
}